package com.dcsgo.socketPlay.client;

import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

/**
 * @author DCSGO
 * @version 1.0
 * 客户端，提供配置信息的读取
 */
public class Client {
    private static final Properties connectiveProperties = new Properties();

    public static String getConnectiveProperty(String key) {
        return connectiveProperties.getProperty(key);
    }


    public Client() {
        new ClientConnectServerThread().start();
    }

    static {
        try {
            System.out.println("正在初始化连接到服务器的配置信息...");
            connectiveProperties.load(new FileReader("./clientProperties.properties"));
            System.out.println("配置文件无误!");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
